package com.itheima.mall.service.umsService;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.mall.mapper.umsMapper.UmsMenuMapper;
import com.itheima.pojo.ums.UmsMenu;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class UmsMenuServiceImpl implements UmsMenuApi{


    @Autowired
    private UmsMenuMapper umsMenuMapper;

    /**
     * 根据menuId得到关联的菜单集合
     * @param menuId
     * @return
     */
    @Override
    public List<UmsMenu> selectByMenuId(Long menuId) {
        LambdaQueryWrapper<UmsMenu> wrapper =new LambdaQueryWrapper<>();
        wrapper.eq(UmsMenu::getId,menuId);
        List<UmsMenu> umsMenus = umsMenuMapper.selectList(wrapper);
        return umsMenus;
    }
}
